OPC-UA Embedded Server SDK  2.1.0
ua_types.h
Go to the documentation of this file.
1 
23 /*****************************************************************************/
29 /*****************************************************************************/
30 /* Copyright (c) 2009 - 2013 MatrikonOPC.
31  *
32  * ALL RIGHTS RESERVED.
33  *
34  * The information contained herein is the confidential and proprietary product
35  * of MatrikonOPC. Any unauthorized use, reproduction or
36  * transfer of this information is strictly prohibited.
37  */
38 
39 #ifndef _UA_TYPES_
40 #define _UA_TYPES_
41 
42 #ifdef _WIN32
43 #include "stdint.h"
44 #else
45 #include <stdint.h>
46 #endif
47 
48 #include <stddef.h>
49 
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53 
54 #include "ua_server_config.h"
55 #include "opcua_status_codes.h"
56 
57 /*****************************************************************************/
61 #define bool_t int
62 #define TRUE 1
63 #define FALSE 0
68 /*****************************************************************************/
69 
72 typedef enum
73 {
88  UA_TYPE_Guid = 14,
102 
103 /*****************************************************************************/
111 typedef enum
112 {
113  opcua_server_state_running = 0,
114  opcua_server_state_failed = 1,
115  opcua_server_state_no_configuration = 2,
116  opcua_server_state_suspended = 3,
117  opcua_server_state_shutdown = 4,
118  opcua_server_state_test = 5,
119  opcua_server_state_communication_fault = 6,
120  opcua_server_state_unknown = 7,
121  end
123 
124 /*****************************************************************************/
130 typedef enum
131 {
135 
136 /*****************************************************************************/
143 typedef enum
144 {
149 
150 /*****************************************************************************/
156 typedef enum
157 {
162 
163 /*****************************************************************************/
168 typedef uint32_t UA_Status_t;
169 
170 /*****************************************************************************/
178 typedef struct
179 {
180  int16_t length;
181  const uint8_t* data;
183 
184 /*****************************************************************************/
192 typedef struct
193 {
194  int32_t length;
195  int32_t max_length;
196  uint8_t* data;
198 
199 /*****************************************************************************/
204 
205 /*****************************************************************************/
210 
211 /*****************************************************************************/
222 typedef uint8_t* UA_GUID_t;
223 
224 /*****************************************************************************/
230 typedef union
231 {
233  int8_t* value_SByte;
234  uint8_t* value_Byte;
235  int16_t* value_Int16;
236  uint16_t* value_UInt16;
237  int32_t* value_Int32;
238  uint32_t* value_UInt32;
239  int64_t* value_Int64;
240  uint64_t* value_UInt64;
241  float* value_Float;
242  double* value_Double;
243  UA_Var_string_t* value_String;
244  int64_t* value_DateTime;
245  uint8_t* value_GUID;
247  UA_Xml_element_t* value_XmlElement;
248  void* value_Any;
249 } UA_Value_t;
250 
251 /*****************************************************************************/
255 typedef struct
256 {
258  const char* PRODUCT_URI;
260  const char* PRODUCT_NAME;
262  const char* MANUFACTURER_NAME;
264  const char* SOFTWARE_VERSION;
266  const char* BUILD_NUMBER;
268  uint64_t BUILD_DATE;
270 
271 /*****************************************************************************/
275 typedef struct
276 {
282  uint32_t PORT_NUMBER;
290  uint32_t MAX_CONNECTIONS;
292 
293 /*****************************************************************************/
298 typedef struct
299 {
307 
308 /*****************************************************************************/
347 typedef struct
348 {
364 
365 /*****************************************************************************/
371 #define UA_USER_TOKEN_POLICY_ANONYMOUS_TOKEN_SECURITY_POLICY_NONE (1<<0)
372 
374 #define UA_USER_TOKEN_POLICY_USERNAME_PASSWORD_TOKEN_SECURITY_POLICY_NONE (1<<1)
375 
376 #define UA_USER_TOKEN_POLICY_USERNAME_PASSWORD_TOKEN_SECURITY_POLICY_Basic128Rsa15 (1<<2)
377 
378 #define UA_USER_TOKEN_POLICY_USERNAME_PASSWORD_TOKEN_SECURITY_POLICY_Basic256 (1<<3)
379 
380 #define UA_USER_TOKEN_POLICY_USERNAME_PASSWORD_TOKEN_SECURITY_POLICY_Basic256Sha256 (1<<4)
381 
383 #define UA_USER_TOKEN_POLICY_X509v3_CERTIFICATE_TOKEN_SECURITY_POLICY_NONE (1<<5)
384 
385 #define UA_USER_TOKEN_POLICY_X509v3_CERTIFICATE_TOKEN_SECURITY_POLICY_Basic128Rsa15 (1<<6)
386 
387 #define UA_USER_TOKEN_POLICY_X509v3_CERTIFICATE_TOKEN_SECURITY_POLICY_Basic256 (1<<7)
388 
389 #define UA_USER_TOKEN_POLICY_X509v3_CERTIFICATE_TOKEN_SECURITY_POLICY_Basic256Sha256 (1<<8)
390 
391 /*****************************************************************************/
398 typedef struct
399 {
403  uint64_t* INTERVALS_ARRAY;
413 
414 /*****************************************************************************/
418 typedef struct
419 {
425  uint32_t MAX_SESSIONS;
443 
444 /*****************************************************************************/
452 typedef struct
453 {
457  const char** NAMESPACE_ARRAY;
459 
460 /*****************************************************************************/
464 typedef struct
465 {
469 
470 /*****************************************************************************/
475 typedef struct
476 {
482 
483 /*****************************************************************************/
487 typedef struct
488 {
500  const char** LOCALE_ID_ARRAY;
502 
503 /*****************************************************************************/
507 typedef struct
508 {
512  const char** SERVER_PROFILE_ARRAY;
514 
515 /*****************************************************************************/
519 typedef struct
520 {
548 
549 /*****************************************************************************/
553 typedef struct
554 {
568 
569 /*****************************************************************************/
573 typedef struct
574 {
578  uint8_t* BUFFER;
590 
591 /*****************************************************************************/
595 typedef struct
596 {
602 
603 /*****************************************************************************/
607 typedef struct
608 {
622 
623 /*****************************************************************************/
627 typedef struct
628 {
656 
657 
658 /*****************************************************************************/
662 typedef enum
663 {
669 
670 /*****************************************************************************/
674 typedef struct
675 {
694  UA_GUID_t guid_identifier;
702 
703 /*****************************************************************************/
707 typedef struct
708 {
713  uint32_t node_handle;
730  uint16_t user_visibility;
736  uint16_t namespace_index;
745 } UA_Base_t;
746 
747 /*****************************************************************************/
752 
753 /*****************************************************************************/
757 typedef UA_Folder_t UA_View_t;
758 
759 /*****************************************************************************/
763 typedef struct
764 {
778  uint16_t user_writable;
779 } UA_File_t;
780 
781 /*****************************************************************************/
785 typedef struct
786 {
799 } UA_Method_t;
800 
801 /*****************************************************************************/
805 typedef struct
806 {
828 
829 /*****************************************************************************/
833 typedef struct
834 {
855 } UA_DataItem_t;
856 
860 typedef struct
861 {
865  float low;
869  float high;
870 } UA_Range_t;
871 
875 typedef struct
876 {
885  int16_t unit_id;
899 
900 /*****************************************************************************/
904 typedef struct
905 {
933 
934 /*****************************************************************************/
938 typedef struct
939 {
953 
954 /*****************************************************************************/
958 typedef struct
959 {
967  uint16_t no_of_values;
973  uint32_t enum_handle;
975 
976 /*****************************************************************************/
980 typedef enum
981 {
986 
987 /*****************************************************************************/
991 typedef enum
992 {
997 
998 /*****************************************************************************/
1002 typedef enum
1003 {
1007 } UA_Digest_t;
1008 
1009 /*****************************************************************************/
1013 typedef enum
1014 {
1021 
1022 /*****************************************************************************/
1026 typedef enum
1027 {
1035 
1036 /*****************************************************************************/
1043 #define OB_SUPPRESS_CERTIFICATE_EXPIRED (1<<0)
1044 
1045 #define OB_SUPPRESS_HOSTNAME_INVALID (1<<1)
1046 
1048 #define OB_SUPPRESS_REVOCATION_STATUS_UNKNOWN (1<<2)
1049 
1050 #define OB_CHECK_REVOCATION_STATUS_ONLINE (1<<3)
1051 
1052 #define OB_CHECK_REVOCATION_STATUS_OFFLINE (1<<4)
1053 
1054 #define OB_USE_DEFAULT_OPTIONS (1<<5)
1055 
1056 #define OB_TRUST_ALL_CLIENTS_WHEN_TRUST_LIST_IS_EMPTY (1U<<31)
1057 
1058 #define OB_DO_NOT_SAVE_REJECTED_CERTIFICATES (1U<<30)
1059 
1062 #ifdef __cplusplus
1063 }
1064 #endif
1065 
1066 #endif /*_UA_TYPES_*/
1067